<html>
<head>
  <script src="sorttable.js"></script>
  <script src="sourceview.js"></script>
  <link rel="stylesheet" type="text/css" href="style.css">
  <title>zcov: /home/vagrant/workspace/proj_libjpeg/cov/jmemnobs.c</title>
</head>
<body>
<center><h1> zcov: <a href="index.html">/home/vagrant/workspace/proj_libjpeg/cov</a>/<a href="jmemnobs.c.html">jmemnobs.c</a> </h1></center>
<hr>


<center>
<table id="headertable" cellpadding=2>
  <tr>
    <td bgcolor=#ACACFF> <b>Files:</b> </td>
    <td bgcolor=#F0F0FF> 1 </td>
    <td width="30"></td>
    <td bgcolor=#ACACFF> <b>Branches&nbsp;Taken:</b> </td>
    <td bgcolor=#F0F0FF align=right> <b>0.0%<b> </td>
    <td bgcolor=#F0F0FF align=right> 0&nbsp;/&nbsp;0 </td>
  </tr>
  <tr>
    <td bgcolor=#ACACFF> <b>Generated:</b> </td>
    <td bgcolor=#F0F0FF> 2016-04-07&nbsp;17:52 </td>
    <td width="30"></td>
    <td bgcolor=#ACACFF> <b>Branches&nbsp;Executed:</b> </td>
    <td bgcolor=#F0F0FF align=right> <b>0.0%<b> </td>
    <td bgcolor=#F0F0FF align=right> 0&nbsp;/&nbsp;0 </td>
  </tr>
  <tr>
    <td colspan=2> </td>
    <td width="30"></td>
    <td bgcolor=#ACACFF> <b>Line&nbsp;Coverage:</b> </td>
    <td bgcolor=#F0F0FF align=right> <b>84.2%</b> </td>
    <td bgcolor=#F0F0FF align=right> 16&nbsp;/&nbsp;19 </td>
  </tr>
</table>
</center>
<p>
<hr>

<center>
<table id="fileheadertable" cellpadding=2>
  <tr>
    <td bgcolor=#ACACFF> <b>Programs:</b> </td>
    <td bgcolor=#F0F0FF> 1 </td>
    <td width="30"></td>
    <td bgcolor=#ACACFF> <b>Runs</b> </td>
    <td bgcolor=#F0F0FF align=right> 5570 </td>
  </tr>
</table>
</center>
<p>
<hr>

<pre>
<span class="lineNum">       1 </span>                : <I><FONT COLOR="#B22222">/*
<span class="lineNum">       2 </span>                :  * jmemnobs.c
<span class="lineNum">       3 </span>                :  *
<span class="lineNum">       4 </span>                :  * Copyright (C) 1992-1996, Thomas G. Lane.
<span class="lineNum">       5 </span>                :  * This file is part of the Independent JPEG Group's software.
<span class="lineNum">       6 </span>                :  * For conditions of distribution and use, see the accompanying README file.
<span class="lineNum">       7 </span>                :  *
<span class="lineNum">       8 </span>                :  * This file provides a really simple implementation of the system-
<span class="lineNum">       9 </span>                :  * dependent portion of the JPEG memory manager.  This implementation
<span class="lineNum">      10 </span>                :  * assumes that no backing-store files are needed: all required space
<span class="lineNum">      11 </span>                :  * can be obtained from malloc().
<span class="lineNum">      12 </span>                :  * This is very portable in the sense that it'll compile on almost anything,
<span class="lineNum">      13 </span>                :  * but you'd better have lots of main memory (or virtual memory) if you want
<span class="lineNum">      14 </span>                :  * to process big images.
<span class="lineNum">      15 </span>                :  * Note that the max_memory_to_use option is ignored by this implementation.
<span class="lineNum">      16 </span>                :  */</FONT></I>
<span class="lineNum">      17 </span>                : 
<span class="lineNum">      18 </span>                : #<B><FONT COLOR="#5F9EA0">define</FONT></B> <FONT COLOR="#B8860B">JPEG_INTERNALS</FONT>
<span class="lineNum">      19 </span>                : #<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F">&quot;jinclude.h&quot;</FONT></B>
<span class="lineNum">      20 </span>                : #<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F">&quot;jpeglib.h&quot;</FONT></B>
<span class="lineNum">      21 </span>                : #<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F">&quot;jmemsys.h&quot;</FONT></B>		<I><FONT COLOR="#B22222">/* import the system-dependent declarations */</FONT></I>
<span class="lineNum">      22 </span>                : 
<span class="lineNum">      23 </span>                : #<B><FONT COLOR="#5F9EA0">ifndef</FONT></B> <FONT COLOR="#B8860B">HAVE_STDLIB_H</FONT>		<I><FONT COLOR="#B22222">/* &lt;stdlib.h&gt; should declare malloc(),free() */</FONT></I>
<span class="lineNum">      24 </span>                : <B><FONT COLOR="#228B22">extern</FONT></B> <B><FONT COLOR="#228B22">void</FONT></B> * malloc <B><FONT COLOR="#0000FF">JPP</FONT></B>((size_t size));
<span class="lineNum">      25 </span>                : <B><FONT COLOR="#228B22">extern</FONT></B> <B><FONT COLOR="#228B22">void</FONT></B> free <B><FONT COLOR="#0000FF">JPP</FONT></B>((<B><FONT COLOR="#228B22">void</FONT></B> *ptr));
<span class="lineNum">      26 </span>                : #<B><FONT COLOR="#5F9EA0">endif</FONT></B>
<span class="lineNum">      27 </span>                : 
<span class="lineNum">      28 </span>                : 
<span class="lineNum">      29 </span>                : <I><FONT COLOR="#B22222">/*
<span class="lineNum">      30 </span>                :  * Memory allocation and freeing are controlled by the regular library
<span class="lineNum">      31 </span>                :  * routines malloc() and free().
<span class="lineNum">      32 </span>                :  */</FONT></I>
<span class="lineNum">      33 </span>                : 
<span class="lineNum">      34 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">void</FONT></B> *)
<span class="lineNum">      35 </span><span class="lineCov">           36438: <B><FONT COLOR="#0000FF">jpeg_get_small</FONT></B> (j_common_ptr cinfo, size_t sizeofobject)</span>
<span class="lineNum">      36 </span>                : {
<span class="lineNum">      37 </span><span class="lineCov">           36438:   <B><FONT COLOR="#A020F0">return</FONT></B> (<B><FONT COLOR="#228B22">void</FONT></B> *) malloc(sizeofobject);</span>
<span class="lineNum">      38 </span>                : }
<span class="lineNum">      39 </span>                : 
<span class="lineNum">      40 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">void</FONT></B>)
<span class="lineNum">      41 </span><span class="lineCov">           36227: <B><FONT COLOR="#0000FF">jpeg_free_small</FONT></B> (j_common_ptr cinfo, <B><FONT COLOR="#228B22">void</FONT></B> * object, size_t sizeofobject)</span>
<span class="lineNum">      42 </span>                : {
<span class="lineNum">      43 </span><span class="lineCov">           36227:   free(object);</span>
<span class="lineNum">      44 </span><span class="lineCov">           36227: }</span>
<span class="lineNum">      45 </span>                : 
<span class="lineNum">      46 </span>                : 
<span class="lineNum">      47 </span>                : <I><FONT COLOR="#B22222">/*
<span class="lineNum">      48 </span>                :  * &quot;Large&quot; objects are treated the same as &quot;small&quot; ones.
<span class="lineNum">      49 </span>                :  * NB: although we include FAR keywords in the routine declarations,
<span class="lineNum">      50 </span>                :  * this file won't actually work in 80x86 small/medium model; at least,
<span class="lineNum">      51 </span>                :  * you probably won't be able to process useful-size images in only 64KB.
<span class="lineNum">      52 </span>                :  */</FONT></I>
<span class="lineNum">      53 </span>                : 
<span class="lineNum">      54 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">void</FONT></B> FAR *)
<span class="lineNum">      55 </span><span class="lineCov">           25122: <B><FONT COLOR="#0000FF">jpeg_get_large</FONT></B> (j_common_ptr cinfo, size_t sizeofobject)</span>
<span class="lineNum">      56 </span>                : {
<span class="lineNum">      57 </span><span class="lineCov">           25122:   <B><FONT COLOR="#A020F0">return</FONT></B> (<B><FONT COLOR="#228B22">void</FONT></B> FAR *) malloc(sizeofobject);</span>
<span class="lineNum">      58 </span>                : }
<span class="lineNum">      59 </span>                : 
<span class="lineNum">      60 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">void</FONT></B>)
<span class="lineNum">      61 </span><span class="lineCov">           25101: <B><FONT COLOR="#0000FF">jpeg_free_large</FONT></B> (j_common_ptr cinfo, <B><FONT COLOR="#228B22">void</FONT></B> FAR * object, size_t sizeofobject)</span>
<span class="lineNum">      62 </span>                : {
<span class="lineNum">      63 </span><span class="lineCov">           25101:   free(object);</span>
<span class="lineNum">      64 </span><span class="lineCov">           25101: }</span>
<span class="lineNum">      65 </span>                : 
<span class="lineNum">      66 </span>                : 
<span class="lineNum">      67 </span>                : <I><FONT COLOR="#B22222">/*
<span class="lineNum">      68 </span>                :  * This routine computes the total memory space available for allocation.
<span class="lineNum">      69 </span>                :  * Here we always say, &quot;we got all you want bud!&quot;
<span class="lineNum">      70 </span>                :  */</FONT></I>
<span class="lineNum">      71 </span>                : 
<span class="lineNum">      72 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">long</FONT></B>)
<span class="lineNum">      73 </span><span class="lineCov">            2434: <B><FONT COLOR="#0000FF">jpeg_mem_available</FONT></B> (j_common_ptr cinfo, <B><FONT COLOR="#228B22">long</FONT></B> min_bytes_needed,</span>
<span class="lineNum">      74 </span>                : 		    <B><FONT COLOR="#228B22">long</FONT></B> max_bytes_needed, <B><FONT COLOR="#228B22">long</FONT></B> already_allocated)
<span class="lineNum">      75 </span>                : {
<span class="lineNum">      76 </span><span class="lineCov">            2434:   <B><FONT COLOR="#A020F0">return</FONT></B> max_bytes_needed;</span>
<span class="lineNum">      77 </span>                : }
<span class="lineNum">      78 </span>                : 
<span class="lineNum">      79 </span>                : 
<span class="lineNum">      80 </span>                : <I><FONT COLOR="#B22222">/*
<span class="lineNum">      81 </span>                :  * Backing store (temporary file) management.
<span class="lineNum">      82 </span>                :  * Since jpeg_mem_available always promised the moon,
<span class="lineNum">      83 </span>                :  * this should never be called and we can just error out.
<span class="lineNum">      84 </span>                :  */</FONT></I>
<span class="lineNum">      85 </span>                : 
<span class="lineNum">      86 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">void</FONT></B>)
<span class="lineNum">      87 </span><span class="lineNoCov">               0: <B><FONT COLOR="#0000FF">jpeg_open_backing_store</FONT></B> (j_common_ptr cinfo, backing_store_ptr info,</span>
<span class="lineNum">      88 </span>                : 			 <B><FONT COLOR="#228B22">long</FONT></B> total_bytes_needed)
<span class="lineNum">      89 </span>                : {
<span class="lineNum">      90 </span><span class="lineNoCov">               0:   ERREXIT(cinfo, JERR_NO_BACKING_STORE);</span>
<span class="lineNum">      91 </span><span class="lineNoCov">               0: }</span>
<span class="lineNum">      92 </span>                : 
<span class="lineNum">      93 </span>                : 
<span class="lineNum">      94 </span>                : <I><FONT COLOR="#B22222">/*
<span class="lineNum">      95 </span>                :  * These routines take care of any system-dependent initialization and
<span class="lineNum">      96 </span>                :  * cleanup required.  Here, there isn't any.
<span class="lineNum">      97 </span>                :  */</FONT></I>
<span class="lineNum">      98 </span>                : 
<span class="lineNum">      99 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">long</FONT></B>)
<span class="lineNum">     100 </span><span class="lineCov">            5570: <B><FONT COLOR="#0000FF">jpeg_mem_init</FONT></B> (j_common_ptr cinfo)</span>
<span class="lineNum">     101 </span>                : {
<span class="lineNum">     102 </span><span class="lineCov">            5570:   <B><FONT COLOR="#A020F0">return</FONT></B> 0;			<I><FONT COLOR="#B22222">/* just set max_memory_to_use to 0 */</FONT></I></span>
<span class="lineNum">     103 </span>                : }
<span class="lineNum">     104 </span>                : 
<span class="lineNum">     105 </span>                : <B><FONT COLOR="#0000FF">GLOBAL</FONT></B>(<B><FONT COLOR="#228B22">void</FONT></B>)
<span class="lineNum">     106 </span><span class="lineCov">            5533: <B><FONT COLOR="#0000FF">jpeg_mem_term</FONT></B> (j_common_ptr cinfo)</span>
<span class="lineNum">     107 </span>                : {
<span class="lineNum">     108 </span>                :   <I><FONT COLOR="#B22222">/* no work */</FONT></I>
<span class="lineNum">     109 </span><span class="lineCov">            5533: }</span>
</pre>
<hr>
Generated: 2016-04-07&nbsp;17:52 by <a href="http://minormatter.com/zcov">zcov</a><br>
</body>
</html>
